//
//  UIImage+Picker.m
//  IntelligenceCommunity
//
//  Created by zhangpei on 15/12/31.
//  Copyright © 2015年 zhangpei. All rights reserved.
//

#import "UIImage+Picker.h"

@implementation UIImage (Picker)

- (UIImage *)pickerImage:(CGFloat)pickerHeight
{
    CGImageRef imageRef = self.CGImage;
    
    CGImageRef imagePartRef = CGImageCreateWithImageInRect(imageRef,CGRectMake(0, (self.size.height - pickerHeight)/2, self.size.width, pickerHeight));
    
    UIImage*cropImage=[UIImage imageWithCGImage:imagePartRef];
    
    CGImageRelease(imagePartRef);
    
    return cropImage;
}
@end
